home *** CD-ROM | disk | FTP | other *** search
- #ifndef _if_ax_h_
- #define _if_ax_h_
-
- #define AXIOGUNIT _IOR(x, 111, int) /* get unit number */
- #define AXIOSHADDR _IOW(x, 112, struct ether_addr) /* set ether_addr */
-
- #define AXSTREAMNAME "ax25" /* streams module name */
- #define AXIFNAME "ax" /* interface name */
- #define AX25MTU 1000 /* max ax25 packet size */
-
- /* An ax25 address is encoded as a struct ether_addr so that it can fit
- * in the arp tables.
- *
- * encoding format in struct ether_addr
- * ________ ______ ______ ______ ______ ______ ______ _____
- * | 8 | 6 | 6 | 6 | 6 | 6 | 6 | 4 |
- * |________|______|______|______|______|______|______|_____|
- *
- * The upper byte of ether_addr is set to 0x99.
- *
- * The next 6 6-bit fields are each filled with an ax25_addr.aa_c[] entry,
- * shifted back to normal ASCII, and then offset from ASCII space
- * (ie. aa_c[0] - ' ').
- *
- * The sid has values ASCII '0' -> ASCII '0'+15. ASCII '0' is subtraced and
- * the low 4 bits of the ether_addr are set from that.
- */
-
- /* screw digipeaters */
- struct ax25_hdr {
- u_char ah_dst[7], ah_src[7];
- u_char ah_cmd;
- u_char ah_pid;
- };
-
- /*
- * AX25 commands. All others are tossed.
- */
- #define AX25CMD_UI 0x03 /* AX25 datagram */
-
- /*
- * AX25 Protocol IDs. All others are tossed.
- */
- #define AX25PID_IP 0xcc /* ARPA IP */
- #define AX25PID_ARP 0xcd /* ARPA ARP */
-
- /*
- * AX25 ARP address types.
- */
- #define AX25_HARDTYPE 0x0003
- #define AX25_IPTYPE ((short)AX25PID_IP)
-
- /*
- * KISS framing. This is SLIP.
- */
- #define KISS_END 0xc0
- #define KISS_ESC 0xdb
- #define KISS_TEND 0xdc
- #define KISS_TESC 0xdd
-
- /*
- * KISS commands - first data byte inside the KISS packet.
- */
- #define KISS_DATA 0x00
- #define KISS_TXDELAY 0x01
- #define KISS_PERSISTANCE 0x02
- #define KISS_SLOTTIME 0x03
- #define KISS_TXTAIL 0x04
- #define KISS_FULLDUPLEX 0x05
- #define KISS_HARDWARE 0x06
- #define KISS_QUIT 0xff
-
- #endif /* _if_ax_h_ */
-